﻿<UserControl x:Class="Torrenter.Client.Main.Views.SearchView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <StackPanel>
        
        <UniformGrid Rows="4" Columns="2">
            <TextBlock>Name:</TextBlock>
            <TextBox x:Name="ShowName"/>
            <TextBlock>Season Number:</TextBlock>
            <TextBox x:Name="SeasonNumber"/>
            <TextBlock>From Episode:</TextBlock>
            <TextBox x:Name="FromEpisode"/>
            <TextBlock >To Episode:</TextBlock>
            <TextBox x:Name="ToEpisode"/>
        </UniformGrid>
        <Button Name="Search" Height="30" HorizontalAlignment="Right">_Search</Button>
        <DataGrid AutoGenerateColumns="False" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" ItemsSource="{Binding Results}" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Name" Binding="{Binding Name}" />
                <DataGridTextColumn Header="Season Number" Binding="{Binding EpisodeDefinition.SeasonNumber}" />
                <DataGridTextColumn Header="Epsiode Number" Binding="{Binding EpisodeDefinition.EpisodeNumnber}" />
                <DataGridCheckBoxColumn Header="Was Found" Binding="{Binding WasFound,Mode=OneWay}" />
                <DataGridTextColumn Header="File Name" Binding="{Binding FileName,Mode=OneWay}" />
            </DataGrid.Columns>
        </DataGrid>
    </StackPanel>
</UserControl>
